#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "PION.h"


PION* piCreer_Pion()
{
    PION* pi=(PION*) malloc(sizeof(PION));
    pi->jo = joCreer_Joueur();
    strcpy (pi->nom, "");
    pi->x_depVoiture=210;
    pi->y_depVoiture=90;
    pi->x_depTram=210;
    pi->y_depTram=90;
    pi->x_depBus=210;
    pi->y_depBus=90;
    pi->x_depVelo=210;
    pi->y_depVelo=90;
    pi->numcase=1;
    return pi;
}

void piLibere_Pion(PION *pi)
{
    free (pi);
}

void piTest_Pion()
{
    PION *pi;
    pi = piCreer_Pion();
    printf("Tests du module pion : \n\n") ;
    /*Début du test de piCreer_Pion*/
    printf("Test de piCreer_Pion ... \n") ;
    assert(pi->x_depVoiture == 210);
    assert(pi->y_depVoiture == 90);
    assert(pi->x_depTram == 210);
    assert(pi->y_depTram == 90);
    assert(pi->x_depBus == 210);
    assert(pi->y_depBus == 90);
    assert(pi->x_depVelo == 210);
    assert(pi->y_depVelo == 90);
    assert(pi->numcase == 1);
    assert(strcmp(pi->nom, "")==0);

    free(pi);

    printf("Tests du module Pion terminé \n\n") ;
}

